<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>index</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$(".zoom,.ilike").hide();

	$(".zoom").each(function(){//遍历所有对象
	var src=$(this).siblings("img").attr("src");
		$(this).attr({href:src});
	});

	$("#nav li").click(function(){
		$("#nav a").removeClass("hover");
		$(this).find("a").addClass("hover");
	});

	$("#waterfall li").mouseover(function(){
		$(this).addClass("hover");
		$(this).find(".zoom,.ilike").show();
	});

	$("#waterfall li").mouseout(function(){
		$(this).removeClass("hover");
		$(this).find(".zoom,.ilike").hide();
	});
});
</script>
</head>

<body>

<div id="main">
	<ul id="waterfall">

          <li>
                <div class="img_block">
                        <img src="files/t02268f5abe5f7a13ce.jpg" />
                        <a href="#" rel="lightbox[plants]" title="测试标题" class="zoom">放大</a>
                        <a href="#" class="ilike">我喜欢</a>
                </div>
                <div class="iNum"><span>1</span></div>
          </li>

    </ul>
    <br />
<div style="visibility:hidden" id=loading class=loading><p><img src="images/loading.gif"><IMG src="images/load.gif"></p></div>

</div>
<script src="js/lightbox.js"></script>
<script src="js/jquery.masonry.min.js"></script>
<script>
  $(function(){

    var $waterfall = $('#waterfall');

    $waterfall.masonry({
      columnWidth: 230
    });

  });
</script>

</body>
</html>
